/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.designpatternspart2.bridgePattern;
/**
 *
 * @author Dwayne
 */
public abstract class Vehicle {
    
    Engine engine;
    int weightInKilos;
    
    public abstract String drive();
    
    public void setEngine(Engine engine)
    {
        this.engine = engine;
    }
        public String reportOnSpeed(int horsepower)
        {
            int ratio = weightInKilos / horsepower;
            if(ratio < 3)
            {
                System.out.println("The vehicle is going at a fast speed");
                return "The vehicle is going at a fast speed";
            }else if((ratio >=3) && (ratio < 8))
            {
                System.out.println("The vehicle is going an average speed");
                return "The vehicle is going an average speed";
            }else
            {
                System.out.println("The vehicle is going at a slow speed");
                return "The vehicle is going at a slow speed";
            }
        }    
}